<template>
  <div class="allOrders">
      <div class="allOrdersNavBar">
          <van-nav-bar title="物流订单" :border="false">
          </van-nav-bar>
      </div>
      <div class="havetakeTab">
          <van-tabs v-model="active" color="#00BF42" @click="tabrouter">
              <van-tab :title="tablist" v-for="(tablist,takes) in tablist" :key="takes">
              </van-tab>
          </van-tabs>
      </div>
      <div class="allOrdersInfo">
        <transport :transport="transport"></transport>
        <haveorder :haveorder="haveorder"></haveorder>
        <receivedmodule :received="received"></receivedmodule>
      </div>
  </div>
</template>
<script>
import transport from "../../components/transport"
import haveorder from "../../components/HaveOrder"
import receivedmodule from "../../components/receivedmodule"
export default {
    name: "allOrders",
    data(){
        return{
            tablist:["全部","待取件","已取件","运输中","已签收"],
            active: 0,
            transport:[
                {"depart":"昆明市",
                "destination":"上海市",
                "departregion":"官渡区",
                "destinationregion":"成边区",
                "indetail":"昭通市镇雄县莲花村7-8-10",
                "weight":"400斤",
                "bulk":"20立方米",
                "freight":"500元",
                "casesnum":"100件"
                },
                {"depart":"曲靖市",
                "destination":"重庆市",
                "departregion":"官渡区",
                "destinationregion":"成边区",
                "indetail":"昭通市镇雄县莲花村7-8-10",
                "weight":"400斤",
                "bulk":"20立方米",
                "freight":"500元",
                "casesnum":"100件"
                },
            ],
            haveorder:[
                {"depart":"昆明市",
                "destination":"上海市",
                "departregion":"官渡区",
                "destinationregion":"成边区",
                "indetail":"昭通市镇雄县莲花村7-8-10",
                "odd":"2455556667789899443",
                "weight":"400斤",
                "freight":"500元",
                },
                {"depart":"曲靖市",
                "destination":"重庆市",
                "departregion":"官渡区",
                "destinationregion":"成边区",
                "indetail":"昭通市镇雄县莲花村7-8-10",
                "odd":"2455556667789899443",
                "weight":"400斤",
                "freight":"500元",
                },
            ],
            received:[
                {"depart":"昆明市",
                "destination":"上海市",
                "departregion":"官渡区",
                "destinationregion":"成边区",
                "indetail":"昭通市镇雄县莲花村7-8-10",
                "odd":"2455556667789899443",
                "weight":"400斤",
                "freight":"500元",
                },
                {"depart":"曲靖市",
                "destination":"重庆市",
                "departregion":"官渡区",
                "destinationregion":"成边区",
                "indetail":"昭通市镇雄县莲花村7-8-10",
                "odd":"2455556667789899443",
                "weight":"400斤",
                "freight":"500元",
                },
            ]
        }
    },
    methods:{
        tabrouter(index){
            if(index==0){
                this.$router.push({path:'/allOrders'});
            }else if(index==1){
                this.$router.push({path:'/takesGoods'});
            }else if(index==2){
                this.$router.push({path:'/haveTake'});
            }else if(index==3){
                this.$router.push({path:'/intransit'});
            }else{
                this.$router.push({path:'/received'})
            }
        },
    },
    components:{
        transport,
        haveorder,
        receivedmodule,
    }
}
</script>

<style scoped>

</style>